//
//  WeDetailLeaveMessageHeaderView.m
//  WeGalaxy
//
//  Created by Zheng on 2017/6/29.
//  Copyright © 2017年 Zheng. All rights reserved.
//

#import "WeDetailLeaveMessageHeaderView.h"

@implementation WeDetailLeaveMessageHeaderView

#pragma mark - 初始化
- (instancetype)init {
    self = [super init];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self subviewsInView];
    }
    return self;
}

#pragma mark - 子视图
- (void)subviewsInView {
    [self addSubview:self.iconImgv];
    [self addSubview:self.nameLbl];
    [self addSubview:self.contentLbl];

    [_iconImgv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.height.width.mas_equalTo(28);
        make.top.mas_equalTo(15);
    }];

    [_nameLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_iconImgv.mas_right).offset(10);
        make.centerY.equalTo(_iconImgv).offset(-1);
    }];
    
    [_contentLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_nameLbl);
        make.top.equalTo(_nameLbl.mas_bottom).offset(7);
    }];
}

- (UIImageView *)iconImgv {
    if (!_iconImgv) {
        _iconImgv = [UIImageView new];
        kCX_RADIUS(_iconImgv, 14, 0);
        _iconImgv.layer.backgroundColor = [[UIColor orangeColor] CGColor];
    }
    return _iconImgv;
}

- (UILabel *)nameLbl {
    if (!_nameLbl) {
        _nameLbl = [UILabel new];
        _nameLbl.font = kCX_FONT(13);
        _nameLbl.text = @"Hannah Gonzales";
    }
    return _nameLbl;
}

- (UILabel *)contentLbl {
    if (!_contentLbl) {
        _contentLbl = [UILabel new];
        _contentLbl.font = kCX_FONT(13);
        _contentLbl.text = @"在哪交易?";
    }
    return _contentLbl;
}



@end
